﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wc.PubSub
{
	/// <summary>
	/// Interface for a subscriber to a <see cref="KeyedCollectionFeed{TKey, TItem}"/>.
	/// </summary>
	/// <typeparam name="TKey"></typeparam>
	/// <typeparam name="TItem"></typeparam>
	public interface IFeedSubscriber<TKey, TItem>
	{
		/// <summary>
		/// Notifies the subcriber of an update from the feed.
		/// The implementation of this method should NOT contain any synchronous I/O.
		/// </summary>
		/// <param name="changedItems"></param>
		/// <param name="removedKeys"></param>
		void FeedUpdate(IEnumerable<TItem> changedItems, IEnumerable<TKey> removedKeys);
	}
}
